package cn.com.weather.nf.service;

import cn.com.weather.nf.entity.TemplateInstances;
import cn.com.weather.nf.vo.ListResult;

import java.io.Serializable;
import java.util.List;

public interface BaseOperateService {

    void save(Serializable data);

    Object findById(Class<?> classType, Serializable id);

    ListResult findPagination(Class<?> beanClass, Integer current, Integer pageSize);

    void delete(Class<?> beanClass, Long id);

    /**
     * 
     * @param type
     * @param current
     * @param pageSize
     * @return
     */
    ListResult findRecordFormPagination(String type, String from, Integer current
            , Integer pageSize, Integer instanceId, String search
            , long beginTime, long endTime);

    /**
     * 
     * @param from
     * @param current
     * @param pageSize
     * @return
     */
    ListResult findRecordWeatherPagination(String from, Integer current, Integer pageSize);

    /**
     * 
     * @param data
     * @param id
     */
    Object update(Serializable data, Long id);

    /**
     *
     * @param type yijian | wenti | tianqi
     */
    List<TemplateInstances> findAllTemplateInstances(String type);
}
